#include "noquarter.h"

#include <qDebug>

NoQuarterState::NoQuarterState(GumballMachine *machine)
    : m_machine(machine)
// : State(machine)
{
}

void NoQuarterState::insertQuarter()
{
    qDebug() << "You just inserted a quarter!";
    if (m_machine)
    {
        m_machine->setState(m_machine->getHasQuarterState());
        qDebug() << "into state of has quarter!";
    }
}

void NoQuarterState::ejectQuarter()
{
    qDebug() << "sorry, you has not inserted a quarter!";
}

void NoQuarterState::turnCrank()
{
    qDebug() << "sorry, you has not inserted a quarter!";
}

void NoQuarterState::dispense() {}
